In NAND-type flash memories, an erase operation is performed collectively in a block unit in some cases. At this time, an erase verify operation is performed in some cases for checking whether erasing of all of memory cells is completely performed. Then, in an erase verify operation, when it is checked that erasing of all of memory cells is not normally performed, an erase operation is repeatedly performed until erasing of all of memory cells is completely performed.